# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 13:44
# @Author  : feng
# @Email   : feng@163.com
# @File    : xsc_page.py
# @Software: PyCharm
from selenium.webdriver.common.by import By
from pages.login_page import LoginPage
from pages.base_page import BasePage

class XscPage(BasePage):
    '''进入转换线索页面'''
    url='http://192.168.1.5:8081/crm/index.php?m=leads&a=index&by=public'
    '''定位器'''
    top_locator=(By.CSS_SELECTOR,"body > div.navbar.navbar-inverse.navbar-fixed-top > div")
    xiansuo_locator=(By.LINK_TEXT,'线索')

    xiansuochi_locator=(By.CSS_SELECTOR,'body > div.container > div.page-header > ul > li:nth-child(2) > a')

    lingqu_locator=(By.LINK_TEXT,"领取")

    #进入最上面切换
    def switch_top(self):
        self.driver.find_element(*self.top_locator)
    #点击线索池
    def click_xiansuo(self):
        self.driver.find_element(*self.xiansuo_locator).click()
    def click_xiansuochi(self):
        self.driver.find_element(*self.xiansuochi_locator).click()
        #点击领取线索
    def click_lingqu(self):
        self.driver.find_element(*self.lingqu_locator).click()